<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Example 4 - A pre-roll, 2 show streams with post-roll ads after each</title>
<script type="text/javascript" src="../dist/flash-firebug-fix.js"></script>
<link rel="stylesheet" type="text/css" href="css/global.css" />
</head>
<body>

<h2>Example 4 - A pre-roll, 2 show streams with post-roll ads after each</h2>
<p class="example">
2 shows streams, sequenced to play one after each other, restricted to 15 secs each in duration,
with a pre-roll ad before the first stream followed by a post-roll after each stream. Auto play
is set to false so you'll have to click the play button to get this example going
and "playOnce" is set to true so ads will only play once for the streams.
</p>
<embed 
  id="ply"
  data="../dist/4.5.swf"
  src="../dist/4.5.swf" 
  width="450"
  height="300"
  allowscriptaccess="always"
  allowfullscreen="true"
  flashvars="height=300&width=450&plugins=../dist/OpenAdStreamer.swf&config=config/rtmp04.xml"
/>
<br/>
<p>
The configuration for this example is:
</p>
<div class="codebox">
<pre>
<code>
&lt;embed 
  id="ply"
  data="../dist/4.5.swf"
  src="../dist/4.5.swf" 
  width="450"
  height="300"
  allowscriptaccess="always"
  allowfullscreen="true"
  flashvars="height=300&width=450&plugins=../dist/OpenAdStreamer.swf&config=config/rtmp04.xml"
/&gt;
</code>
</pre>
</div>
<p>
"rtmp04.xml" is defined as:
</p>
<div class="codebox">
<pre>
<code class="xml">
&lt;config&gt;
   &lt;openadstreamer.title&gt;
       RTMP Example 04
   &lt;/openadstreamer.title&gt;
   &lt;openadstreamer.json&gt;
       {
            "allowPlaylistControl": false,
            "playOnce": true,
            "autoPlay": true,

            "shows": {
               "baseURL": "rtmp://ne7c0nwbit.rtmphost.com/videoplayer",
               "streams": [
                    { "file":"the-black-hole.mp4", "duration":"00:00:15" },
                    { "file":"the-black-hole.mp4", "duration":"00:00:15" }
               ]
            },

            "ads": {
               "servers": [
                   {
                      "type": "OpenX",
                      "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php"
                   }
               ],
               "notice": { "textStyle": "smalltext" },
               "schedule": [
                    {
                       "zone": "1",
                       "position": "pre-roll",
                       "applyToParts": [ 0 ]
                    },
                    {
                       "zone": "1",
                       "position": "post-roll"
                    }
               ]
            },

            "debug": {
               "levels": "fatal",
               "debugger": "firebug"
            }
        }
   &lt;/openadstreamer.json&gt;
&lt;/config&gt;
</code>
</pre>
</div>
<script type="text/javascript" src="js/tracking.js">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10158120-3");
if(TRACKING_TURNED_ON) {
	pageTracker._trackPageview();
}
} catch(err) {}
</script>
</body>
</html>
